Slide Range Argmin with priority queue
https://gyazo.com/daf92a2b122d491eedaa4ea8299587a2
Range min]/Range argmin sliding in one direction can be realized with [priority queue Put (value, location) in priority queue
Add new entries to the range to the queue
When the minimum value is read, if it is out of range, just skip the reading.
---
This page is auto-translated from /nishio/スライドRange Argminを優先度キューで. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.